.contentBox {
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 0;
}

.chatTime {
    color: #666;
    text-align: center;
    width: 100%;
    display: block;
    border-radius: 8px;
    margin: 0 auto 20px auto;
    width: fit-content;
    padding: 8px 16px;
    background-color: #f0f0f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 30px;
    line-height: 30px;
}

/* 容器样式 */
.emoji-input-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    padding-bottom: calc(8px + constant(safe-area-inset-bottom));
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background-color: #ffffff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 200;
    min-height: 56px;
    border-radius: 25px;
}

/* 下拉刷新容器 */
.pull-refresh-container {
    height: 100vh;
    box-sizing: border-box;
}

/* 消息列表区域 */
.messages {
    height: 100vh;
    box-sizing: border-box;
    margin: 0;
    margin-bottom: calc(120px + constant(safe-area-inset-bottom));
    margin-bottom: calc(120px + env(safe-area-inset-bottom));
}

/* 上拉刷新相关样式 */
.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 60px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-text {
    font-size: 14px;
    color: #666;
}

.load-more-tip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-text {
    font-size: 14px;
    color: #999;
}

/* 加载动画 */
@keyframes loading-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4096ff;
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
}

.msg-row {
    display: flex;
    padding: 6px 12px;
    margin-bottom: 8px;
}

.msg-row.me {
    justify-content: flex-end;
}

.msg-row.other {
    justify-content: flex-start;
}

.msg-row .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 8px;
    flex-shrink: 0;
}

.msg-row .avatar img {
    width: 100%;
    height: 100%;
    display: block;
}

.msg-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 16px;
    line-height: 1.4;
    word-break: break-word;
    position: relative;
}

.msg-bubble.me {
    background-color: #4096ff;
    color: #fff;
    border-top-right-radius: 4px;
}

.msg-bubble.other {
    background-color: #f5f5f5;
    color: #333;
    border-top-left-radius: 4px;
}

// 发送者姓名容器样式
.sender-name-container {
    margin-bottom: 4px;
    padding: 0 12px;
    height: 20px;
    display: flex;
    align-items: center;
}

.sender-name-container.me {
    justify-content: flex-end;
}

.sender-name-container.other {
    justify-content: flex-start;
}

.sender-name-text {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

// .msg-bubble .time {
//     display: none;
// }

// .msg-bubble.other .time {
//     color: #888;
// }

/* 消息项容器 */
.msg-item {
    margin-bottom: 12px;
}

/* 气泡下方独立时间样式 */
.msg-time {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 4px;
}

.msg-time text,
.msg-time Text {
    font-size: 12px;
    color: #888;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.msg-bubble .status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.msg-bubble.other .status {
    color: #999;
}

/* 输入框和触发器容器 */
.input-wrapper {
    display: flex;
    align-items: center;
    /* 垂直居中对齐 */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 10px;
    transition: border-color 0.2s;
    background-color: #ffffff;
}

.input-wrapper:focus-within {
    border-color: #4096ff;
    /* 输入框聚焦时边框变色 */
    box-shadow: 0 0 0 2px rgba(64, 150, 255, 0.2);
}

/* 输入框样式 */
.input-box {
    flex: 1;
    /* 占满剩余空间 */
    border: none;
    padding: 12px 0;

    outline: none;
    /* 移除默认聚焦轮廓 */
    min-width: 0;
    /* 防止内容溢出 */
}

/* 输入框操作按钮 */
.input-actions {
    display: flex;
    gap: 14px;
    position: absolute;
    right: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.action-btn:hover {
    color: #0078FF;
    background-color: rgba(0, 120, 255, 0.05);
}

.action-btn:active {
    background-color: #e8e8e8;
}

/* 发送按钮 */
.send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: #0078FF;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-btn:hover {
    background-color: #0056D2;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}


.category-btn {
    padding: 4px 10px;
    margin-right: 8px;
    border: none;
    background: none;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover {
    background-color: #e8e8e8;
    color: #333;
}

.category-btn.active {
    background-color: #4096ff;
    color: white;
}

/* 表情列表区域 */
/* 网格布局（纵向滚动） */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.emoji-item {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 4px;
    font-size: 52px;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 10px;
}

.emoji-item:hover {
    background-color: #f0f0f0;
}

.emoji-item:active {
    background-color: #e0e0e0;
}

/* 自定义滚动条 */
.message-input::-webkit-scrollbar {
    width: 4px;
}

.message-input::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.message-input::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.message-input::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 滚动条美化（仅WebKit浏览器） */
.emoji-list::-webkit-scrollbar {
    width: 6px;
}

.emoji-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.emoji-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.emoji-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

// 我写的

.mybox {
    position: fixed;
    // left: 2.5%;
    // right: 2.5%;
    // bottom: 30px;
    // width: 95%;
    // border-radius: 50px;
    width: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    min-height: 66px;
    overflow: auto;

}

.mybox-inner {
    margin: 10px;
    display: flex;
    align-items: center;
    background-color: #f3f3f3;
    border-radius: 50px;
    padding: 10px;
}

.mybtn {
    border-radius: 50%;
    border: none;
    background-color: #0078FF;
    color: #fff;
}

.myinput {
    flex: 1;
    padding: 12px 16px;
    padding-left: 30px;
    padding-right: 90px;
}

.voice-btn {
    flex: 1;
    padding: 12px 16px;
    padding-left: 30px;
    padding-right: 90px;
    border: 0;
    background-color: #f3f3f3;
}

.mybox-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.icon-xiaolian,
.icon-chahao,
.icon-jiahao,
.icon-anjian {
    font-size: 68px;
}

.icon-yuyin {
    font-size: 62px;
}

.icon-fasong {
    font-size: 50px;
    color: white;
    text-align: center;
    display: inline-block;
    transform: rotate(15deg);
    transform-origin: center;
}

.feiji {
    width: 100px;
    height: 66px;
    background-color: red;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

// 额外功能
.extra-function {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    margin-top: 30px;
    /* 让第四个入口在小屏也能换行显示 */
    flex-wrap: wrap;
}

.icon-xiangce,
.icon-shipintonghua,
.icon-a-111_paishe,
.yuyin {
    font-size: 66px;
    padding: 30px;
    border-radius: 25px;
    background-color: #f3f3f5;
}

.extra-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 保持四等分布局，防止第四个被挤出屏幕 */
    flex: 0 0 25%;
    box-sizing: border-box;
    margin-bottom: 12px;
}

// 语音消息相关样式
.voice-message-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

    &.playing {
        background-color: rgba(64, 150, 255, 0.1);

        .voice-icon {
            color: #4096ff;
        }

        .voice-wave .wave-bar {
            animation: wave-animation 0.8s ease-in-out infinite;
        }
    }
}

.voice-icon {
    font-size: 20px;
    color: #666;
    transition: color 0.2s ease;
}

.voice-duration {
    font-size: 14px;
    color: #666;
    min-width: 30px;
}

.voice-wave {
    display: flex;
    gap: 2px;
    align-items: center;
    flex: 1;
}

.wave-bar {
    width: 3px;
    height: 12px;
    background-color: #ccc;
    border-radius: 2px;
    transition: all 0.2s ease;

    &:nth-child(1) {
        animation-delay: 0s;
    }

    &:nth-child(2) {
        animation-delay: 0.1s;
    }

    &:nth-child(3) {
        animation-delay: 0.2s;
    }

    &:nth-child(4) {
        animation-delay: 0.3s;
    }

    &:nth-child(5) {
        animation-delay: 0.4s;
    }
}

@keyframes wave-animation {

    0%,
    100% {
        height: 12px;
        background-color: #ccc;
    }

    50% {
        height: 20px;
        background-color: #4096ff;
    }
}

.voice-text-preview {
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    border-left: 3px solid #4096ff;
}

.voice-text-content {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.voice-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.voice-progress-bar {
    width: 100%;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    cursor: pointer;

    &:hover {
        height: 4px;
    }
}

.voice-progress-fill {
    height: 100%;
    background-color: #4096ff;
    transition: width 0.1s ease;
    border-radius: 2px;
}

.voice-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.current-time {
    color: #4096ff;
    font-weight: 600;
}

.total-time {
    color: #999;
}

// 语音输入相关样式
.voice-input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.voice-btn {
    flex: 1;
    padding: 12px 16px;
    padding-left: 30px;
    padding-right: 90px;
    border: 0;
    background-color: #f3f3f3;
    border-radius: 25px;
    transition: all 0.2s ease;

    &.recording {
        background-color: #ff4d4f;
        color: white;

        .voice-text {
            color: white;
        }
    }
}

.voice-text {
    font-size: 16px;
    color: #666;
    text-align: center;
}

.voice-preview-text {
    padding: 8px 12px;
    background-color: rgba(64, 150, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(64, 150, 255, 0.2);
}

.preview-label {
    font-size: 12px;
    color: #4096ff;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.preview-content {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.voice-converting {
    padding: 8px 12px;
    background-color: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.2);
    text-align: center;
}

.converting-text {
    font-size: 14px;
    color: #ff8c00;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

// 语音播放错误样式
.voice-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background-color: rgba(255, 77, 79, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 77, 79, 0.2);
    margin-top: 8px;
}

.error-text {
    font-size: 12px;
    color: #ff4d4f;
    flex: 1;
}

.retry-btn {
    padding: 4px 8px;
    background-color: #ff4d4f;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;

    &:hover {
        background-color: #d9363e;
    }

    &:active {
        background-color: #b32d35;
    }
}

.retry-text {
    font-size: 12px;
    color: white;
    font-weight: 600;
}

// 播放状态图标样式
.icon-pause {
    font-size: 20px;
    color: #4096ff;
}

// 增强的波形动画
.wave-bar {
    width: 3px;
    height: 12px;
    background-color: #ccc;
    border-radius: 2px;
    transition: all 0.2s ease;

    &:nth-child(1) {
        animation-delay: 0s;
    }

    &:nth-child(2) {
        animation-delay: 0.1s;
    }

    &:nth-child(3) {
        animation-delay: 0.2s;
    }

    &:nth-child(4) {
        animation-delay: 0.3s;
    }

    &:nth-child(5) {
        animation-delay: 0.4s;
    }

    &.active {
        animation: wave-animation 0.8s ease-in-out infinite;
    }
}

@keyframes wave-animation {

    0%,
    100% {
        height: 12px;
        background-color: #ccc;
    }

    50% {
        height: 20px;
        background-color: #4096ff;
    }
}

// 语音消息加载状态
.voice-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(64, 150, 255, 0.05);
    border-radius: 6px;
    margin-top: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #4096ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 12px;
    color: #4096ff;
}

// 视频通话样式 - 全屏显示
.video-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;

    .video-call-container {
        width: 100%;
        height: 100%;
        background: #000;
        display: flex;
        flex-direction: column;

        .video-call-header {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            background: rgba(0, 0, 0, 0.7);
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            z-index: 10001;
            backdrop-filter: blur(10px);

            .video-call-title {
                color: #fff;
                font-size: 18px;
                font-weight: 600;
                margin: 0;
            }

            .video-call-end-btn {
                background: #ff4d4f;
                color: white;
                border: none;
                padding: 10px 20px;
                border-radius: 8px;
                font-size: 16px;
                font-weight: 600;
            }
        }

        .video-call-content {
            flex: 1;
            position: relative;
            background: #000;
            width: 100%;
            height: 100%;

            .video-wrapper {
                width: 100%;
                height: 100%;
                position: relative;

                .remote-video {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }

                .local-video {
                    position: absolute;
                    top: 80px;
                    right: 20px;
                    width: 120px;
                    height: 90px;
                    object-fit: cover;
                    border-radius: 8px;
                    border: 2px solid #fff;
                    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
                }
            }

            .video-call-controls {
                position: absolute;
                bottom: 40px;
                left: 50%;
                transform: translateX(-50%);
                display: flex;
                align-items: center;
                gap: 30px;
                z-index: 10001;

                .control-btn {
                    width: 60px;
                    height: 60px;
                    border-radius: 50%;
                    background: rgba(255, 255, 255, 0.2);
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: white;
                    font-size: 24px;
                    backdrop-filter: blur(10px);
                    border: 1px solid rgba(255, 255, 255, 0.3);
                    transition: all 0.2s ease;

                    &.end-call {
                        background: #ff4757;
                    }

                    &:active {
                        transform: scale(0.95);
                    }

                    &:hover {
                        background: rgba(255, 255, 255, 0.3);
                    }
                }
            }
        }
    }
}


/* 视频通话邀请弹窗 */
.video-call-incoming-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;

    .video-call-incoming-container {
        background: white;
        border-radius: 16px;
        padding: 30px;
        text-align: center;
        max-width: 300px;
        width: 90%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

        .incoming-call-avatar {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            border-radius: 50%;
            overflow: hidden;

            .avatar-img {
                width: 100%;
                height: 100%;
            }
        }

        .incoming-call-title {
            font-size: 20px;
            font-weight: 600;
            color: #333;
            margin: 0 0 10px 0;
        }

        .incoming-call-subtitle {
            font-size: 14px;
            color: #666;
            margin: 0 0 30px 0;
        }

        .incoming-call-actions {
            display: flex;
            gap: 15px;
            justify-content: center;

            .incoming-call-btn {
                flex: 1;
                padding: 12px 20px;
                border-radius: 8px;
                font-size: 16px;
                font-weight: 600;
                border: none;

                &.reject {
                    background: #ff4757;
                    color: white;
                }

                &.accept {
                    background: #2ed573;
                    color: white;
                }

                &:active {
                    transform: scale(0.95);
                }
            }
        }
    }
}

// 语音通话样式 - 全屏显示
.voice-call-audio-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  .voice-pusher {
    width: 200px;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 20px;
  }
  
  .voice-call-status {
    text-align: center;
    color: white;
    
    .voice-call-icon {
      font-size: 64px;
      margin-bottom: 24px;
      display: block;
      animation: pulse 2s infinite;
    }
    
    .voice-call-text {
      font-size: 24px;
      font-weight: 600;
      margin-bottom: 12px;
      display: block;
    }
    
    .voice-call-tip {
      font-size: 16px;
      opacity: 0.9;
      display: block;
    }
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

// 自动刷新状态指示器样式
.refresh-status-container {
  padding: 8px 16px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  
  .refresh-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    
    .refresh-text {
      font-size: 14px;
      color: #007bff;
      font-weight: 500;
      animation: refresh-pulse 1.5s ease-in-out infinite;
    }
  }
  
  .last-refresh-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    
    .refresh-time-text {
      font-size: 12px;
      color: #6c757d;
    }
    
    .manual-refresh-btn {
      background-color: #007bff;
      color: white;
      padding: 4px 12px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      
      &:hover {
        background-color: #0056b3;
        transform: translateY(-1px);
      }
      
      &:active {
        transform: translateY(0);
        background-color: #004085;
      }
      
      .refresh-btn-text {
        font-size: 12px;
        font-weight: 500;
      }
    }
  }
}

// 下拉刷新动画
@keyframes refresh-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

// 下拉刷新指示器样式优化
.messages {
  // 确保下拉刷新指示器可见
  .taro-scroll-view-refresher {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
  }
  
  // 下拉刷新文本样式
  .taro-scroll-view-refresher-text {
    color: #007bff;
    font-size: 14px;
    font-weight: 500;
  }
}